package br.com.efacta.bagarita.controllers.rest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import br.com.efacta.bagarita.domain.Discipline;
import br.com.efacta.bagarita.domain.repos.DisciplineRepository;

//@RestController
@RequestMapping("/disciplines")
public class DisciplineController {

    @Autowired
    private DisciplineRepository repository;

    @RequestMapping(value = "/", method = RequestMethod.GET)
    public Iterable<Discipline> getDisciplines() {
        return repository.findAll();
    }
}
